import request from '@/utils/request'

// 查询banner列表
export function listBanners(query) {
    return request({
        url: '/app/banners/list',
        method: 'get',
        params: query
    })
}

// 查询banner详细
export function getBanners(id) {
    return request({
        url: '/app/banners/' + id,
        method: 'get'
    })
}

// 新增banner
export function addBanners(data) {
    return request({
        url: '/app/banners',
        method: 'post',
        data: data
    })
}

// 修改banner
export function updateBanners(data) {
    return request({
        url: '/app/banners',
        method: 'put',
        data: data
    })
}

// 删除banner
export function delBanners(id) {
    return request({
        url: '/app/banners/' + id,
        method: 'delete'
    })
}
